import React from 'react'
import ReactDOM from 'react-dom/client'
import 'bootstrap/dist/css/bootstrap.css'
import App from './App'

import store from './store'

store.subscribe(() => {
  // 每次 dispatch action 肯定肯定会走这儿
  // 数据确实变了，但是视图没有更新
  // console.log(store.getState())
  root.render(<App store={store} />)
})

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(<App store={store} />)
